<navigation:Page x:Class="SD.Samples.Views.Home"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    d:DesignWidth="640" d:DesignHeight="300" mc:Ignorable="d"
    Style="{StaticResource PageStyle}">

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0" FontSize="16" TextWrapping="Wrap" Foreground="{StaticResource BaseBrush4}" Text="SAMPLES" Margin="0,10,0,0"/>
        <TextBlock Grid.Row="1" FontSize="16" TextWrapping="Wrap" Foreground="{StaticResource BaseBrush5}" Text="SELECT ONE OF THE SAMPLE CATEGORIES BELOW" HorizontalAlignment="Left" Margin="0,3,0,0"/>

        <toolkit:Accordion Grid.Row="2" ItemsSource="{Binding Samples.SampleCatagories}" HorizontalAlignment="Stretch" BorderThickness="0" Margin="0,10,0,0">
            <toolkit:Accordion.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Name}" />
                </DataTemplate>
            </toolkit:Accordion.ItemTemplate>
            <toolkit:Accordion.ContentTemplate>
                <DataTemplate>
                    <ItemsControl ItemsSource="{Binding Samples}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Margin="4">
                                    <HyperlinkButton FontSize="16" Content="{Binding Name}" Foreground="{StaticResource HighLightColorBrush}"
                                        Command="{Binding DataContext.NavigateToSampleCommand, ElementName=LayoutRoot}"
                                        CommandParameter="{Binding Name}" />

                                    <TextBlock FontSize="14" Text="{Binding Description}" Foreground="{StaticResource BaseBrush5}" />
                                </StackPanel>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </DataTemplate>
            </toolkit:Accordion.ContentTemplate>
        </toolkit:Accordion>
    </Grid>
</navigation:Page>